//package com.ruicar.afs.cloud.demo.demo.mq.rabbit.sender;
//
//import cn.hutool.core.thread.ThreadUtil;
//import com.ruicar.afs.cloud.common.mq.rabbit.message.AfsTransEntity;
//import com.ruicar.afs.cloud.common.mq.rabbit.message.MqTransCode;
//import com.ruicar.afs.cloud.demo.demo.mq.rabbit.DemoMqMessage;
//import lombok.AllArgsConstructor;
//import org.springframework.boot.context.event.ApplicationReadyEvent;
//import org.springframework.context.ApplicationListener;
//import org.springframework.core.Ordered;
//import org.springframework.core.annotation.Order;
//import org.springframework.stereotype.Component;
//
//
////@Component
//@AllArgsConstructor
//public class SenderAll implements ApplicationListener<ApplicationReadyEvent> {
//    private DemoSender demoSender;
//
//    @Override
//    public void onApplicationEvent(ApplicationReadyEvent event) {
//        process();
//    }
//
//    public void process(){
//        ThreadUtil.execute(() -> {
//            while(true){
//                demoSender.sendToTest(AfsTransEntity.<DemoMqMessage>builder().transCode(MqTransCode.AFS_TEST_DEMO_TRANS_CODE).data(DemoMqMessage.builder().id("sdf").heheda("sdfsdfrwer").build() ).build());
//                demoSender.sendToTestNoExists("这是测试不存在");
//                ThreadUtil.sleep(100);
//            }
//        });
//    }
//}
